# utf-8

def do_func():
    pass

# 使用字典来表示图，键是节点，值是与该节点相邻的节点列表
graph = {
    'A': ['B', 'C'],
    'B': ['D', 'E'],
    'C': ['F'],
    'D': [],
    'E': [],
    'F': []
}

visited = set()  # 用于记录已访问过的节点


def dfs(node):
    if node not in visited:
        print(node)
        visited.add(node)
        for neighbor in graph[node]:
            dfs(neighbor)


# 从节点 'A' 开始进行深度优先搜索
dfs('A')
